/*
* <p>Copyright： 东软烟草产品研发团队</p>
*/
package com.jkl.dao.user;

import java.util.List;

import com.jkl.entity.button.BsButton;
import org.apache.ibatis.annotations.Param;

import com.jkl.entity.login.weight.Weight;
import com.jkl.entity.menu.BsMenu;
import com.jkl.entity.po.user.BSUser;
import com.jkl.entity.role.BsRole;

import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

/**
 * <p>
 * Dao
 * <p>
 * <p>
 * 变更说明：@author ji.k 2018-09-26Dao
 * <p>
 * Date:2018-09-26
 * 
 * @author ji.k
 * @version 1.0
 */
public interface BSUserMapper extends Mapper<BSUser>, InsertListMapper<BSUser> {

	BSUser findByUserName(@Param("userName") String userName, @Param("passWord") String passWord);

	List<BsRole> getRoles(@Param("rowId") Integer rowId);

	List<BsMenu> getMenus(@Param("rowId") Integer rowId);

	List<BSUser> getAllUserByParam(BSUser params);

	void addUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
	//Weight queryWeight(int rowId);
	int insertWeight(Weight weight);

    boolean addUserWithPersonId(@Param("rowId") Integer rowId, @Param("personId") Integer personId);

	List<BsButton> getButtonMenus(String roleCode);
	//int updateWeight(Weight weight);
}
